package day08;

import java.util.Scanner;

/**
 * @author Xiao
 * @date 2021/7/9
 */
public class SplitString {
    /**
     *      切割字符串
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Student stu = new Student();
        System.out.println("请输入学生姓名和年龄(如：张三，23)：");
        String s = sc.nextLine();
        String[] split = s.split("，");
        for (int i = 0; i < split.length; i++) {
            System.out.println(split[i]);
        }
    }
}
